package com.example.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by joe on 17-4-24.
 */
@Component
@PropertySource("classpath:test.properties")
@ConfigurationProperties(prefix = "author")
public class Author {
  private String name;
  private String age;
  private String url;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getAge() {
    return age;
  }

  public void setAge(String age) {
    this.age = age;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  @Override
  public String toString() {
    return "Author{" +
        "name='" + name + '\'' +
        ", age='" + age + '\'' +
        ", url='" + url + '\'' +
        '}';
  }
}
